home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
Buch
/
Poly3.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-29
|
1KB
|
36 lines
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "Poly3.h"
//---------------------------------------------------------------------------
// TOButton mu▀ als Komponenten installiert sein !!!
//---------------------------------------------------------------------------
#pragma link "obutton1" // Datei OButton1.obj
#pragma resource "*.dfm"
TStringList *Anzeige;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OButton1Click(TObject *Sender)
{
Label1->Caption = Anzeige->Strings[random(5)];
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
randomize ();
Anzeige= new TStringList;
Anzeige->Add ("Hallo!");
Anzeige->Add ("Hoppla!");
Anzeige->Add ("Oha!");
Anzeige->Add ("Oh jeh!");
Anzeige->Add ("Nun denn!");
}
//---------------------------------------------------------------------------